org.eclipse.team.ui.synchronize.actions
Class SubscriberAction
java.lang.Object
org.eclipse.ui.actions.ActionDelegate
org.eclipse.team.internal.ui.actions.TeamAction
org.eclipse.team.ui.synchronize.actions.SubscriberAction
- All Implemented Interfaces:
- IActionDelegate, IActionDelegate2, IObjectActionDelegate, IViewActionDelegate
- public abstract class SubscriberAction
- extends org.eclipse.team.internal.ui.actions.TeamAction
- implements IViewActionDelegate
This is an abstract superclass for actions associated with a
TeamSubscriberParticipant
. It provides helper methods to
access and filter selections that contain ITeamSubscriberParticipantNode
instances.
It is optional for TeamSubscriberParticipant actions to subclass.
- Since:
- 3.0
Fields inherited from class org.eclipse.team.internal.ui.actions.TeamAction |
PROGRESS_BUSYCURSOR, PROGRESS_DIALOG, PROGRESS_WORKBENCH_WINDOW, selection, shell |
Method Summary |
protected SyncInfo[] |
getFilteredSyncInfos()
Return the selected SyncInfo for which this action is enabled. |
protected SyncInfoFilter |
getSyncInfoFilter()
|
protected SyncInfo[] |
getSyncInfos()
This method returns all instances of SynchronizeViewNode that are in the current
selection. |
protected boolean |
isEnabled()
The default enablement behavior for subscriber actions is to enable
the action if there is at least one SyncInfo in the selection
for which the action is enabled (determined by invoking
isEnabled(SyncInfo) ). |
protected boolean |
select(SyncInfo info)
Return true if the action should be enabled for the given SyncInfo. |
Methods inherited from class org.eclipse.team.internal.ui.actions.TeamAction |
getAdapter, getProviderMapping, getProviderMapping, getSelectedAdaptables, getSelectedProjects, getSelectedResources, getSelectedResources, getShell, getTargetPage, getTargetPart, handle, init, run, selectionChanged, setActionEnablement, setActivePart, showView |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUBSCRIBER_JOB_TYPE
public static final QualifiedName SUBSCRIBER_JOB_TYPE
SubscriberAction
public SubscriberAction()
getSyncInfos
protected SyncInfo[] getSyncInfos()
- This method returns all instances of SynchronizeViewNode that are in the current
selection. For a table view, this is any resource that is directly selected.
For a tree view, this is any descendants of the selected resource that are
contained in the view.
- Returns:
- the selected resources
isEnabled
protected boolean isEnabled()
throws TeamException
- The default enablement behavior for subscriber actions is to enable
the action if there is at least one SyncInfo in the selection
for which the action is enabled (determined by invoking
isEnabled(SyncInfo)
).
- Returns:
- whether the action is enabled
- Throws:
TeamException
- if an error occurs during enablement detection- See Also:
TeamAction.isEnabled()
select
protected boolean select(SyncInfo info)
- Return true if the action should be enabled for the given SyncInfo.
Default behavior is to use a SyncInfoFilter to determine if the action
is enabled.
- Parameters:
info
-
- Returns:
getSyncInfoFilter
protected SyncInfoFilter getSyncInfoFilter()
getFilteredSyncInfos
protected SyncInfo[] getFilteredSyncInfos()
- Return the selected SyncInfo for which this action is enabled.
- Returns:
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.